/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.persistencia.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author SHERLY
 */
@Embeddable
public class MaestroPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "idMstId")
    private int idMstId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idMstItmId")
    private int idMstItmId;

    public MaestroPK() {
    }

    public MaestroPK(int idMstId, int idMstItmId) {
        this.idMstId = idMstId;
        this.idMstItmId = idMstItmId;
    }

    public int getIdMstId() {
        return idMstId;
    }

    public void setIdMstId(int idMstId) {
        this.idMstId = idMstId;
    }

    public int getIdMstItmId() {
        return idMstItmId;
    }

    public void setIdMstItmId(int idMstItmId) {
        this.idMstItmId = idMstItmId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idMstId;
        hash += (int) idMstItmId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MaestroPK)) {
            return false;
        }
        MaestroPK other = (MaestroPK) object;
        if (this.idMstId != other.idMstId) {
            return false;
        }
        if (this.idMstItmId != other.idMstItmId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.persistencia.domain.MaestroPK[ idMstId=" + idMstId + ", idMstItmId=" + idMstItmId + " ]";
    }
    
}
